$(document).ready(function(){//延迟事件

        
        $(function () {
                //引入id标签;
                var navtive = $("#mydaohang");
                //设置导航标签为置顶;
                var offsetTop = navtive.offset().top;
                
                //定义一个监听高度;
                var scrollHeight = $(document).scrollTop;
                fn(navtive, offsetTop);
                //设置监听事件;
                $(window).scroll(function () {
                    fn(navtive, offsetTop);
                });
                //调用方法;
                function fn(navtive, offsetTop) {
    
                    var scrollHeight = $(document).scrollTop();
                    
                    if (offsetTop > scrollHeight *1.3) {
                        
                        var obj = document.getElementById("mydaohang2");
                        obj.style.visibility = " hidden";
                       
                    } else {
                        
                        var obj = document.getElementById("mydaohang2");
                        obj.style.visibility = "visible";
                       
                     
                    }
                  
                    if (scrollHeight >1550) {
                        
                        console.log("底部")
                        var obj = document.getElementById("zuo");
                         obj.style.position="absolute";
                        obj.style.bottom=0;
                        obj.style.paddingLeft=0;
                        obj.style.paddingBottom=0;
                        obj.style.left=0;
                       
                        
    
    //                     position: absolute;
    // position: relative;
    // position: -ms-page;
    // position: -webkit-sticky;
    // position: inherit;
                        
                       
                    } else {
                        console.log("不是")
                      
                        var obj = document.getElementById("zuo");
                        obj.style.position="fixed";
                        
                    }
                }
            });
    $("#jiben").click(function(){console.log("j")
            $("#div1").append("<button>?</button>");
            $("#div1").prepend("<button>?</button>");
    
    });
    
    $(".yincang").click(function () {
                console.log("隐藏了！")
    
                // $(this).addclass("in");
    
                // //对不是类class为in的元素移除active类
    
                // $(".option_title").not(".in").removeclass("active");
    
                // //多次点击设置改元素的类为active或不是active
    
                // $(this).toggleclass("active");
    
                // //以滑动方式隐藏所有list
    
                // $(".nav-list").slideup();
    
                // //以滑动方式显示元素
    
                // $(".active").next().slidedown();
    
                // //移除选中optiondiv的in类
    
                // $(this).removeclass("in");
    
            });
    
    });
       
    





    